{extend name="public:common_edit"/}
{block name="main"}

<style>
    .tipStyle {
        display: none;
        position: absolute;
        background-color: #FBEC88;
        font-size: 16px;
        border-right: #D0EAF9 solid 1px;
        border-bottom: #D0EAF9 solid 1px;
        border-left: #D0EAF9 solid 1px;
        border-top: #D0EAF9 solid 1px;
    }

</style>

<div id="kyqToolTip" class="tipStyle"></div>

    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-list"></i> 聊天记录</h3>
        </div>
        <div class="panel-body">

            <div class="navbar navbar-default">
                <form action="" id="search-form2" class="navbar-form form-inline" method="get" onsubmit="return false">

                    <div class="form-group">
                        <label class="control-label" >用户ID:</label>
                        <div class="input-group">
                            <input type="number" name="uuid" value="{$Think.get.uuid}" placeholder="用户ID" class="form-control">
                        </div>

                    </div>
                    <div class="form-group">
                        <label class="control-label" >接收人ID:</label>
                        <div class="input-group">
                            <input type="number" name="to_user" value="{$Think.get.to_user}" placeholder="用户ID" class="form-control">
                        </div>

                    </div>
                    <div class="form-group">
                        <label class="control-label" >时间</label>
                        <div class="input-group">
                            <input type="text"   name="date"  autocomplete="off" value="{$Think.get.date}" placeholder="选择开始时间"
                                   class="form-control timepicker">
                        </div>
                    </div>


                    <button type="submit" onclick="javascript:document.getElementById('search-form2').submit();"
                            id="button-filter search-order" class="btn btn-primary"><i class="fa fa-search"></i> 筛选
                    </button>

                </form>
            </div>
            <div id="ajax_return">
                <form method="post" enctype="multipart/form-data" target="_blank" id="form-order">
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <td>发送时间</td>
                                <td>发送人ID</td>
                                <td>发送人昵称</td>
                                <td>发送人头像</td>
                                <td>消息类型</td>
                                <td>内容</td>
                                <td>接收人ID</td>
                                <td>接收人昵称</td>
                                <td>接收人头像</td>
                            </tr>
                            </thead>
                            <tbody>
                            <!-- 列表循环开始 -->
                            {volist name="rows" id="row" key="key"}
                            <tr>
                                <td>{$row.created_at}</td>
                                <td>{$row['formInfo']['user_id']}</td>
                                <td>{$row.formInfo.nick_name}</td>
                                <td><img style="max-width: 80px" src=" {$row.formInfo.header_img}"  alt=""></td>
                                <td>文字</td>
                                <td class="emojstext">{$row['content']['content']}</td>
                                <td>{$row['targetInfo']['user_id']}</td>
                                <td>{$row.targetInfo.nick_name}</td>
                                <td><img style="max-width: 80px" src=" {$row.targetInfo.header_img}"  alt=""></td>
                            </tr>
                            {/volist}
                            <!-- 列表循环结束 -->
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
            <div id='pagerarea'>{$pageHTML}</div>
        </div>
    </div>
{/block}
{block name="js"}

<script src="__JS__/boxImg.js" type="text/javascript" ></script>
<link rel="stylesheet" type="text/css" href="__CSS__/boxImg.css">


<script>


    $(function () {

        $.each($('.emojstext'),function (k,v) {
            var $text = $(v);
            var html = $text.html().trim().replace(/\n/g, '<br/>');
            html = jEmoji.softbankToUnified(html);
            html = jEmoji.googleToUnified(html);
            html = jEmoji.docomoToUnified(html);
            html = jEmoji.kddiToUnified(html);
            $text.html(jEmoji.unifiedToHTML(html));
        });

        var is_agent = "{$Think.get.is_agent}";
        $('#is_agent'+is_agent).attr('selected','selected')
    })



</script>

{include file="user/js" /}
{/block}




